const mode = process.VUE_CLI_SERVICE.mode
console.log("mode=", mode);
if(mode == "local"){
    process.env.VUE_APP_SERVICE_URL = "http://192.168.1.135:8088";
    process.env.VUE_APP_PLATFORM = "/HiatmpPro";
    process.env.VUE_APP_MOCK = true;
    process.env.MAP_URL = 'http://81.69.47.35:8080/HiMap/himap.js';
}if(mode == "peanut"){
    process.env.VUE_APP_SERVICE_URL = "http://gis9nq.natappfree.cc";
    process.env.VUE_APP_PLATFORM = "/HiatmpPro";
    process.env.VUE_APP_MOCK = true;
    process.env.MAP_URL = 'http://81.69.47.35:8080/HiMap/himap.js';
}else if(mode == "development"){
    // process.env.VUE_APP_SERVICE_URL = "http://81.69.47.35:8007";
    process.env.VUE_APP_SERVICE_URL = "http://81.69.47.35:8080";
    process.env.VUE_APP_PLATFORM = "/HiatmpPro";
    process.env.VUE_APP_MOCK = false;
    process.env.MAP_URL = 'http://81.69.47.35:8080/HiMap/himap.js';
}else if(mode == "production"){
    process.env.VUE_APP_SERVICE_URL = "http://56.39.133.11:8180";
    process.env.VUE_APP_PLATFORM = "/HiatmpPro";
    process.env.VUE_APP_MOCK = true;
    process.env.MAP_URL = 'http://10.231.32.31:9499/HiMap/himap.js';
}
module.exports = {
    publicPath : './',
    productionSourceMap: false,
    lintOnSave: false,
    css: {
        loaderOptions: {
            less: {
                lessOptions: {
                    modifyVars: {
                        'primary-color':'#4779C2',
                        'border-radius-base': '0',
                        'layout-header-height': '46px',
                        'form-item-margin-bottom': '14px',
                        'layout-header-padding':'0 20px',
                        'table-header-bg-sm':"#F1F1F2",
                        'table-padding-horizontal':"0",
                    },
                    javascriptEnabled: true,
                },
            },
        },
    },
    chainWebpack: config =>{
        config.plugin('html')
            .tap(args => {
                args[0].title = "青岛高速勤务平台";
                args[0].mapUrl = process.env.MAP_URL;
                return args;
            })
    },

};
